/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Caps
 */
@Embeddable
public class QuestionarioHasQuestaoPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "questionario_idquestionario")
    private int questionarioIdquestionario;
    @Basic(optional = false)
    @NotNull
    @Column(name = "questao_idquestao")
    private int questaoIdquestao;

    public QuestionarioHasQuestaoPK() {
    }

    public QuestionarioHasQuestaoPK(int questionarioIdquestionario, int questaoIdquestao) {
        this.questionarioIdquestionario = questionarioIdquestionario;
        this.questaoIdquestao = questaoIdquestao;
    }

    public int getQuestionarioIdquestionario() {
        return questionarioIdquestionario;
    }

    public void setQuestionarioIdquestionario(int questionarioIdquestionario) {
        this.questionarioIdquestionario = questionarioIdquestionario;
    }

    public int getQuestaoIdquestao() {
        return questaoIdquestao;
    }

    public void setQuestaoIdquestao(int questaoIdquestao) {
        this.questaoIdquestao = questaoIdquestao;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) questionarioIdquestionario;
        hash += (int) questaoIdquestao;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof QuestionarioHasQuestaoPK)) {
            return false;
        }
        QuestionarioHasQuestaoPK other = (QuestionarioHasQuestaoPK) object;
        if (this.questionarioIdquestionario != other.questionarioIdquestionario) {
            return false;
        }
        if (this.questaoIdquestao != other.questaoIdquestao) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "modelo.QuestionarioHasQuestaoPK[ questionarioIdquestionario=" + questionarioIdquestionario + ", questaoIdquestao=" + questaoIdquestao + " ]";
    }
    
}
